export const toast = {
    success: (title: string, duration: number = 1500): void => {
        uni.showToast({ title, icon: "success", duration });
    },
    fail: (title: string, duration: number = 1500): void => {
        uni.showToast({ title, icon: "error", duration });
    },
    info: (title: string, duration: number = 1500): void => {
        uni.showToast({ title, icon: "none", duration });
    }
};
//判断string、object是否为空
export const isEmpty = (arg: any) => {
    if (arg == undefined || !arg) {
        return true;
    }
    if (typeof arg == "string") {
        return arg.length == 0;
    } else if (typeof arg == "object") {
        return true;
    }
};
